<template>
  <div class="viphallData">
    <!-- 顶部 -->
    <div style="margin: 10px">
      <h4>贵宾厅基础数据</h4>
    </div>
    <!-- 查询条件 -->
    <div class="middle">
      <el-form ref="form" :model="selectData" size="mini" :inline="true">
        <el-form-item label="所属分类" prop="name">
          <el-select clearable v-model="selectData.ofType" placeholder="请选择">
            <el-option
              v-for="item in ofTypeList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item
          size="mini"
          label="所属城市"
          v-if="
            selectData.ofType == 'domesticAirport' ||
            selectData.ofType == 'internationalAirport'
          "
        >
          <el-select
            v-model="selectData.ofCityId"
            filterable
            clearable
            placeholder="请选择"
          >
            <el-option
              v-for="(item, index) in cityFlightList"
              :key="index"
              :label="item.airportCityName"
              :value="item.airportCityId"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item
          size="mini"
          label="所属城市"
          v-if="
            selectData.ofType == 'highstation' ||
            selectData.ofType == 'trainstation'
          "
        >
          <el-select
            v-model="selectData.ofCityId"
            filterable
            clearable
            placeholder="请选择"
          >
            <el-option
              v-for="(item, index) in cityTrainList"
              :key="index"
              :label="item.cityName"
              :value="item.cityCode"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item size="mini" label="贵宾厅名称" prop="phone">
          <el-input v-model="selectData.loungeName" size="mini"></el-input>
        </el-form-item>
        <el-form-item size="mini" label="状态" prop="phone">
          <el-select
            clearable
            v-model="selectData.loungeStatus"
            placeholder="请选择"
          >
            <el-option
              v-for="item in statusList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="selectMethod()">查询</el-button>
          <el-button type="primary" @click="clearadddate()">新增</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!-- 订单列表 -->
    <div class="table">
      <el-table
        size="mini"
        :header-cell-style="{
          color: '#fff',
          background: '#6090EC',
          fontSize: '11px',
          fontWeight: 'normal',
        }"
        :data="viphallList"
        border
        style="width: 100%"
      >
        <el-table-column prop="loungeName" label="名称"> </el-table-column>
        <el-table-column prop="ofCityName" label="所属城市"> </el-table-column>
        <el-table-column prop="ofType" label="贵宾厅分类">
          <template slot-scope="scope">
            <template v-if="scope.row.ofType == 'domesticAirport'"
              >国内机场</template
            >
            <template v-if="scope.row.ofType == 'internationalAirport'"
              >国际机场</template
            >
            <template v-if="scope.row.ofType == 'highstation'">高铁</template>
            <template v-if="scope.row.ofType == 'trainstation'"
              >火车站</template
            >
            <template v-if="scope.row.ofType == 'harbor'">港口</template>
          </template>
        </el-table-column>
        <el-table-column prop="ofPlaceName" label="所属机场/高铁">
        </el-table-column>
        <el-table-column prop="ofTerminalName" label="航站楼">
        </el-table-column>
        <el-table-column
          prop="businessStartTime,businessEndTime"
          label="营业时间"
        >
          <template slot-scope="scope">
            {{ scope.row.businessStartTime }}- {{ scope.row.businessEndTime }}
          </template>
        </el-table-column>
        <el-table-column prop="loungePhone" label="贵宾厅电话">
        </el-table-column>
        <el-table-column prop="managerName" label="服务负责人">
        </el-table-column>
        <el-table-column prop="managerPhone" label="负责人电话">
        </el-table-column>
        <el-table-column prop="loungeStatus" label="状态">
          <template slot-scope="scope">
            <template v-if="scope.row.loungeStatus == 'yes'">启用</template>
            <template v-if="scope.row.loungeStatus == 'no'">未启用</template>
            <template v-if="scope.row.loungeStatus == 'del'">删除</template>
          </template>
        </el-table-column>
        <el-table-column width="220px" label="操作">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="primary"
              @click="editviphallmethod(scope.row)"
              >修改</el-button
            >
            <el-button size="mini" type="primary" @click="delMethod(scope.row)"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </div>

    <!-- 新增弹窗 -->
    <el-dialog
      :lock-scroll="false"
      title="贵宾厅基础数据"
      :close-on-click-modal="false"
      :visible.sync="centerDialogVisible"
      width="90%"
      center
    >
      <!-- 基本信息 -->
      <div class="jbxx">
        <div class="lump-top">基本信息</div>
        <div class="lump-bottom" style="border-bottom: 0.5px solid #4490ae">
          <div class="lump-bottom-small"> <span class="mustItem">*</span> 所属分类</div>
          <div class="lump-bottom-big" style="display: flex">
            <el-select
              v-model="adddata.ofType"
              clearable
              size="mini"
              style="width: 130px; height: 30px"
              filterable
            >
              <el-option
                v-for="(item, index) in ofTypeList"
                :key="index"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
          <div class="lump-bottom-small"> <span class="mustItem">*</span>所属城市</div>
          <div class="lump-bottom-big" style="display: flex">
            <el-select
              @change="cityFlightChange"
              v-model="adddata.ofCityCode"
              v-if="
                adddata.ofType == 'domesticAirport' ||
                adddata.ofType == 'internationalAirport'
              "
              clearable
              size="mini"
              style="width: 130px; height: 30px"
              filterable
              placeholder="请选择城市"
            >
              <el-option
                v-for="(item, index) in cityFlightList"
                :key="index"
                :label="item.airportCityName"
                :value="item.airportCityId"
              >
              </el-option>
            </el-select>
            <el-select
              @change="cityTrainChange"
              v-model="adddata.ofCityIdtihuan"
              v-if="
                (cityTrainList.length && adddata.ofType == 'highstation') ||
                adddata.ofType == 'trainstation'
              "
              clearable
              size="mini"
              style="width: 130px; height: 30px"
              filterable
              placeholder="请选择城市"
            >
              <el-option
                v-for="(item, index) in cityTrainList"
                :key="index"
                :label="item.cityName"
                :value="item.cityCode"
              >
              </el-option>
            </el-select>
          </div>
          <div class="lump-bottom-small"> <span class="mustItem">*</span>所属机场/车站</div>
          <div class="lump-bottom-big">
            <el-select
              @change="ofPlaceIdChange"
              v-model="adddata.ofPlaceCode"
              v-if="
                adddata.ofType == 'domesticAirport' ||
                adddata.ofType == 'internationalAirport'
              "
              size="mini"
              filterable
              placeholder="请选择机场"
              clearable
            >
              <el-option
                v-for="(item, index) in airportList"
                :key="index"
                :label="item.airportName"
                :value="item.airportId"
              >
              </el-option>
            </el-select>
            <!-- <el-select @change="ofPlaceIdTrainChange" v-model="adddata.ofPlaceIdtihuan" v-if="adddata.ofType =='highstation'||adddata.ofType =='trainstation'" size="mini" filterable placeholder="请选择机场" clearable>
              <el-option v-for="(item,index) in trainList" :key="index" :label="item.airportName"
                :value="item.airportId +'-'+ airportName">
              </el-option>
            </el-select> -->
          </div>
          <div class="lump-bottom-small"> 航站楼</div>
          <div class="lump-bottom-big">
            <el-select
              v-model="adddata.ofTerminalId"
              @change="ofTerminalIdChange"
              size="mini"
              filterable
              placeholder="请选择航站楼"
              clearable
            >
              <el-option
                v-for="item in Terminallist"
                :key="item.terminalId"
                :label="item.terminalName"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </div>
        </div>
        <div class="lump-bottom">
          <div class="lump-bottom-small"><span class="mustItem">*</span>选择供应商</div>
          <div class="lump-bottom-big" style="display: flex">
            <el-select
              v-model="adddata.deptId"
              size="mini"
              style="width: 130px; height: 30px"
              filterable
              placeholder="请选择部门"
              clearable
              @change="deptIdchange"
            >
              <el-option
                v-for="(item, index) in departmentList"
                :key="index"
                :label="item.deptName"
                :value="item.deptId"
              >
              </el-option>
            </el-select>
            <el-select
              v-model="adddata.deptAdminId"
              size="mini"
              style="width: 130px; height: 30px"
              filterable
              placeholder="请选择员工"
              clearable
            >
              <el-option
                v-for="(item, index) in postslists"
                :key="index"
                :label="item.adminName"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </div>
        </div>
      </div>
      <!-- 贵宾厅信息 -->
      <div class="jbxx">
        <div class="lump-top">贵宾厅信息</div>
        <div class="lump-bottom">
          <div class="lump-bottom-small"><span class="mustItem">*</span>贵宾厅名称</div>
          <div class="lump-bottom-big-1">
            <el-input
              v-model="adddata.loungeName"
              size="mini"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>贵宾厅地址</div>
          <div class="lump-bottom-big-1">
            <el-input
              v-model="adddata.loungeAddress"
              size="mini"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>贵宾厅电话</div>
          <div class="lump-bottom-big-1" style="display: flex">
            <el-input
              v-model="adddata.loungePhone"
              size="mini"
              placeholder="请输入内容"
            ></el-input>
          </div>
        </div>
        <div class="lump-bottom">
          <div class="lump-bottom-small"><span class="mustItem">*</span>贵宾厅经度</div>
          <div class="lump-bottom-big-1">
            <el-input
              v-model="adddata.loungeLongitude"
              size="mini"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>贵宾厅纬度</div>
          <div class="lump-bottom-big-1">
            <el-input
              v-model="adddata.loungeLatitude"
              size="mini"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="lump-bottom-small">获取经纬度</div>
          <div class="lump-bottom-big-1">
            <div
              style="display: flex; cursor: pointer"
              @click="coordinatesgdList"
            >
              <div>http://lbs.amap.com/console/show/picker</div>
            </div>
          </div>
        </div>
        <div class="lump-bottom">
          <div class="lump-bottom-small"><span class="mustItem">*</span>负责人名称</div>
          <div class="lump-bottom-big-1">
            <el-input
              v-model="adddata.managerName"
              size="mini"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>负责人电话</div>
          <div class="lump-bottom-big-1">
            <el-input
              v-model="adddata.managerPhone"
              size="mini"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>贵宾厅位置</div>
          <div class="lump-bottom-big-1">
            <el-radio-group v-model="adddata.loungeAddressClass">
              <el-radio label="安检内">安检内</el-radio>
              <el-radio label="安检外">安检外</el-radio>
              <el-radio label="要客">贵宾区</el-radio>
            </el-radio-group>
          </div>
        </div>
        <div class="lump-bottom">
          <div class="lump-bottom-small"><span class="mustItem">*</span>状态</div>
          <div class="lump-bottom-big-1">
            <el-radio-group v-model="adddata.loungeStatus">
              <el-radio label="no">禁用</el-radio>
              <el-radio label="yes">启用</el-radio>
            </el-radio-group>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>出发区域</div>
          <div class="lump-bottom-big-1">
            <el-radio-group v-model="adddata.departRegion">
              <el-radio label="国内出发">国内出发</el-radio>
              <el-radio label="国际出发">国际出发</el-radio>
            </el-radio-group>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>营业时间</div>
          <div class="lump-bottom-big-1">
            <el-time-picker
              format="HH:mm"
              value-format="HH:mm"
              style="width: 130px"
              size="mini"
              v-model="adddata.businessStartTime"
              :picker-options="{
                selectableRange: '00:00:00 - 23:59:59',
              }"
              placeholder="任意时间点"
            >
            </el-time-picker
            >至
            <el-time-picker
              style="width: 130px"
              format="HH:mm"
              value-format="HH:mm"
              size="mini"
              v-model="adddata.businessEndTime"
              :picker-options="{
                selectableRange: '00:00:00 - 23:59:59',
              }"
              placeholder="任意时间点"
            >
            </el-time-picker>
          </div>
        </div>
        <div class="lump-bottom">
          <div class="lump-bottom-small"><span class="mustItem">*</span>是否含通道</div>
          <div class="lump-bottom-big-1">
            <el-radio-group
              v-model="adddata.isInclusionChannel"
              style="margin-top: 10px"
            >
              <el-radio label="yes">含通道</el-radio>
              <el-radio label="no">不含通道</el-radio>
            </el-radio-group>
            <!-- <el-input v-if="radio == 6" style="width: 200px" v-model="adddata.vipchannelAddress" size="mini"
              placeholder="请输入通道地址"></el-input>-->
          </div>

          <div class="lump-bottom-small"><span class="mustItem">*</span>贵宾厅类型</div>
          <div class="lump-bottom-big-1">
            <el-radio-group v-model="adddata.loungeCalss">
              <el-radio label="餐厅">餐厅</el-radio>
              <el-radio label="贵宾厅">贵宾厅</el-radio>
              <!-- <el-radio  label="lounge">休息室</el-radio> -->
              <!-- <el-radio  label="vipPassageway">VIP通道</el-radio> -->
            </el-radio-group>
          </div>
          <div class="lump-bottom-small">备注</div>
          <div class="lump-bottom-big-1">
            <el-input size="mini" v-model="adddata.loungeRemark"></el-input>
          </div>
        </div>
        <div class="lump-bottom">
          <div class="lump-bottom-small">
            贵宾厅标签<span style="color: red; font-size: 12px">用","拼</span>
          </div>
          <div class="lump-bottom-big-1" style="display: flex; width: 700px">
            <el-input
              v-model="adddata.loungeLabel"
              size="mini"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>服务设施</div>
          <div class="lump-bottom-big-1" style="display: flex; width: 700px">
            <el-checkbox-group
              v-model="facility"
              @change="facilityChange"
              style="line-height: 10px"
            >
              <el-checkbox
                v-for="(item, i) in selectViphaltagList"
                :key="i"
                :label="item.id"
                >{{ item.facilityName }}
              </el-checkbox>
            </el-checkbox-group>

            <el-button
              size="mini"
              type="primary"
              @click="manageDialogVisible = true"
              >管理服务设施
            </el-button>
          </div>
        </div>
      </div>

      <!-- 价格信息 -->
      <div class="jbxx">
        <div class="lump-top">价格信息</div>
        <div class="lump-bottom">
          <div class="lump-bottom-small"><span class="mustItem">*</span>采购价</div>
          <div class="lump-bottom-big" style="display: flex">
            <el-input size="mini" v-model="adddata.purchasePrice"></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>市场价</div>
          <div class="lump-bottom-big" style="display: flex">
            <el-input size="mini" v-model="adddata.marketPrice"></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>销售价</div>
          <div class="lump-bottom-big" style="display: flex">
            <el-input size="mini" v-model="adddata.sellingPrice"></el-input>
          </div>
          <div class="lump-bottom-small"><span class="mustItem">*</span>评分</div>
          <div class="lump-bottom-big" style="display: flex">
            <el-input
              size="mini"
              type="number"
              max="5"
              v-model="adddata.loungeScore"
            ></el-input>
          </div>
        </div>
      </div>
      <!-- 套餐 -->
      <div class="jbxx">
        <div class="lump-top">套餐</div>
        <div class="lump-bottom" style="display: flex">
          <el-table
            size="mini"
            :header-cell-style="{
              color: '#606266',
              background: '#E8F3F7',
              fontSize: '11px',
              fontWeight: 'normal',
            }"
            :data="viphallServiceInstructionsList"
            border
            style="width: 100%"
            tooltip-effect="dark"
          >
            <el-table-column prop="name" label="套餐名称"> </el-table-column>
            <el-table-column prop="content" label="套餐内容"> </el-table-column>
            <el-table-column prop="imgurl" label="套餐图片">
              <template slot-scope="scope">
                <img
                  :src="baseURL + scope.row.imgurl"
                  alt=""
                  style="width: 50px; height: 50px"
                />
              </template>
            </el-table-column>

            <el-table-column width="220px" label="操作">
              <template slot-scope="scope">
                <!-- <el-button size="mini" type="primary" @click="editinstrmethod(scope.row)">修改</el-button> -->
                <el-button
                  size="mini"
                  type="primary"
                  @click="delinstrmethod(scope.row, scope.$index)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <div>
            <el-button
              type="primary"
              size="mini"
              @click="instructionsDialogVisiblemethod()"
              >新增</el-button
            >
          </div>
        </div>
      </div>
      <!-- 会员/亲朋价维护 -->
      <div class="jbxx">
        <div class="lump-top"><span class="mustItem">*</span>会员销售价</div>
        <div class="lump-bottom">
          <el-input
            style="width: 100px"
            size="mini"
            v-model="adddata.memberPrice"
          ></el-input>
        </div>
      </div>
      <!-- 积分兑换价维护 -->
      <div class="jbxx">
        <div class="lump-top">积分兑换价维护</div>
        <div class="lump-bottom">
          <el-input
            style="width: 100px"
            size="mini"
            v-model="adddata.integralPrice"
          ></el-input>
        </div>
      </div>

      <!-- 图片 -->
      <div class="jbxx">
        <div class="lump-top"><span class="mustItem">*</span>图片</div>
        <div class="lump-bottom">
          <!-- <el-upload action="/file/fileMapping/uploadAvatarVIPHall" list-type="picture-card" :on-success="successupload"
            :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
            <i class="el-icon-plus"></i>
          </el-upload> -->
          <el-upload
            :data="multipartFile"
            :headers="header"
            :action="imgHttpAllUrl"
            list-type="picture-card"
            :on-remove="fatherImghandleRemove"
            accept=".jpg,.jpeg,.png,.gif"
            :on-success="fatherImghandlePic"
            multiple
            :file-list="fatherImglistPic"
          >
            <i class="el-icon-plus" />
          </el-upload>
          <el-dialog :visible.sync="fatherImgdialogVisible">
            <img width="100%" :src="dialogImageUrl" alt="" />
          </el-dialog>
        </div>
      </div>
      <!-- 图文维护 -->
      <div class="jbxx">
        <div class="lump-top"><span class="mustItem">*</span>图文维护</div>
        <div class="lump-bottom">
          <div style="width: 100%; height: 100%">
            <!-- 图片上传组件辅助-->
            <!-- 富文本 -->
            <quill-editor
              v-model="quill"
              ref="myQuillEditor"
              :value="quillContent"
              :options="editorOption"
              @change="onEditorChange"
            >
            </quill-editor>
            <el-upload
              accept="image/png,image/jpeg,image/jpg,image/gif"
              class="avatar-uploader quill-img"
              :action="imgHttpAllUrl"
              :multiple="false"
              :show-file-list="false"
              :on-success="uploadSuccess"
              :data="multipartFile"
              :headers="header"
            >
            </el-upload>
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="centerDialogVisible = false">取消</el-button>
        <el-button type="primary" @click="gocreate()">确定</el-button>
      </span>
    </el-dialog>
    <!-- 所有管理按钮弹窗 -->
    <!-- 管理服务标签前弹窗 -->
    <el-dialog
      title="管理特殊服务标签"
      :visible.sync="manageDialogVisible"
      width="60%"
      center
      append-to-body
    >
      <el-button @click="addmanageMethod()" size="mini" type="primary"
        >新增</el-button
      ><br />
      <el-table
        size="mini"
        :header-cell-style="{
          color: '#fff',
          background: '#6090EC',
          fontSize: '11px',
          fontWeight: 'normal',
        }"
        :data="selectViphaltagList"
        border
        style="width: 100%"
        tooltip-effect="dark"
      >
        <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
        <el-table-column prop="facilityName" label="设施名称">
        </el-table-column>
        <el-table-column prop="facilityPic" label="图片">
          <template slot-scope="scope">
            <img
              slot="reference"
              :src="baseURL + scope.row.facilityPic"
              style="width: 20px; height: 20px"
            />
          </template>
        </el-table-column>
        <el-table-column width="220px" label="操作">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="primary"
              @click="editmanageMethod(scope.row)"
              >修改</el-button
            >
            <el-button
              size="mini"
              type="primary"
              @click="delmanageMethod(scope.row)"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>

      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="manageDialogVisible = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>

    <!-- 新增服务设施 -->
    <el-dialog
      title="服务设施"
      :visible.sync="manageDialogVisibleson"
      width="40%"
      center
      append-to-body
    >
      <el-form ref="form" :model="addtagdata" label-width="80px">
        <el-form-item label="设施名称">
          <el-input
            placeholder="必填"
            size="mini"
            style="width: 250px"
            v-model="addtagdata.facilityName"
          ></el-input>
        </el-form-item>

        <el-form-item label="图片">
          <el-upload
            class="avatar-uploader"
            :action="imgHttpUrl"
            :show-file-list="false"
            :on-success="manageImgSuccess"
            :data="multipartFile"
            :headers="header"
          >
            <img
              v-if="addtagdata.facilityPicImg"
              :src="addtagdata.facilityPicImg"
              class="avatar"
            />
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addtagDialogVisibleson = false">取 消</el-button>
        <el-button type="primary" @click="addtagMethod()">确 定</el-button>
      </span>
    </el-dialog>

    <!-- 删除服务设施 -->
    <el-dialog
      title="删除设施"
      :visible.sync="delmanageDialogVisibleson"
      width="40%"
      center
      append-to-body
    >
      <span>确认删除此设施吗</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="delmanageDialogVisibleson = false">取 消</el-button>
        <el-button type="primary" @click="getdelRemovemanage()"
          >确 定</el-button
        >
      </span>
    </el-dialog>

    <!-- x新增套餐 -->
    <el-dialog
      title="套餐"
      :visible.sync="instructionsDialogVisible"
      width="30%"
      center
      append-to-body
    >
      <el-form ref="form" :model="instructionadddata" label-width="80px">
        <!-- <el-form-item label="贵宾厅id	">
                <el-input v-model="instructionadddata.viphallId"></el-input>
              </el-form-item> -->
        <el-form-item label="套餐名称	">
          <el-input v-model="instructionadddata.name"></el-input>
        </el-form-item>
        <el-form-item label="套餐内容	">
          <el-input v-model="instructionadddata.content"></el-input>
        </el-form-item>
        <el-form-item label="图片">
          <el-upload
            class="avatar-uploader"
            :action="imgHttpUrl"
            :show-file-list="false"
            :on-success="instructionImgSuccess"
            :data="multipartFile"
            :headers="header"
          >
            <img
              v-if="instructionadddata.imgurlImg"
              :src="instructionadddata.imgurlImg"
              class="avatar"
            />
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="instructionsDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="instructionsclick()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 删除 -->
    <el-dialog
      title="删除套餐"
      :visible.sync="delinstructionsDialogVisible"
      width="30%"
      center
      append-to-body
    >
      <span>确认删除此条套餐吗</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="delinstructionsDialogVisible = false"
          >取 消</el-button
        >
        <el-button type="primary" @click="getremoveinstructions()"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 删除 -->
    <el-dialog
      title="删除贵宾厅"
      :visible.sync="delViphhallDialogVisible"
      width="30%"
      center
      append-to-body
    >
      <span>确认删除此VIP贵宾厅吗</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="delinstructionsDialogVisible = false"
          >取 消</el-button
        >
        <el-button type="primary" @click="delVipLounge()">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
const toolbarOptions = [
  ["bold", "italic", "underline", "strike"],
  [
    {
      header: 1,
    },
    {
      header: 2,
    },
  ],
  [
    {
      list: "ordered",
    },
    {
      list: "bullet",
    },
  ],
  [
    {
      indent: "-1",
    },
    {
      indent: "+1",
    },
  ],
  [
    {
      direction: "rtl",
    },
  ],
  [
    {
      color: [],
    },
    {
      background: [],
    },
  ],
  [
    {
      align: [],
    },
  ],
  ["image"],
];
export default {
  name: "Quill",
  props: {
    quillContent: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      imgHttpUrl: this.$imgHttpUrl,
      imgHttpAllUrl: this.$imgHttpAllUrl,
      formattime: "yyyy-MM-dd",
      format: "HH:mm:ss",
      baseURL: localStorage.getItem("baseUrl"),
      // 查询数据
      selectData: {
        ofType: "", //所属分类
        ofCityId: "", //所属城市
        loungeName: "", //状态
        loungeStatus: "yes", //手机号
        pageSize: "10",
        pageNo: "1",
      },
      // 所属分类

      ofTypeList: [
        {
          value: "domesticAirport",
          label: "国内机场",
        },
        {
          value: "internationalAirport",
          label: "国际机场",
        },
        {
          value: "highstation",
          label: "高铁站",
        },

        {
          value: "trainstation",
          label: "火车站",
        },
        {
          value: "harbor",
          label: "港口",
        },
      ],
      // 状态下拉
      statusList: [
        {
          value: "yes",
          label: "启用",
        },
        {
          value: "no",
          label: "未启用",
        },
        {
          value: "del",
          label: "删除",
        },
      ],
      // 图片请求头
      multipartFile: { type: "vipHall" },
      header: {
         token:localStorage.getItem('Xd_Token'),
      },

      // 基础数据新增
      adddata: {
        id: "",
        ofType: "", //分类
        ofCityId: "", //所属城市id
        ofCityName: "", //所属城市名
        ofCityCode: "", //所属城市三字码
        ofPlaceId: "", //所属机场、高铁、港口id
        ofPlaceName: "", //所属对应名称
        ofPlaceCode: "", //所属对应三字码
        ofTerminalId: "", //所属航站楼
        ofTerminalName: "", //所属航站楼名称
        deptId: "", //所属部门
        deptAdminId: "", //所属管理员
        loungeName: "", //贵宾厅名称
        loungeAddress: "", //贵宾厅地址
        loungePhone: "", //贵宾厅电话
        loungeCalss: "餐厅", //贵宾厅类型(餐厅/贵宾厅)
        loungeScore: "", //贵宾厅评分
        loungeLabel: "", //贵宾厅标签(json)
        loungeFacility: "", //贵宾厅服务设施(json)
        loungeSuit: "", //贵宾厅套餐(json)
        loungeBackground: "", //贵宾厅背景图(json)
        loungeLongitude: "", //贵宾厅经度
        loungeLatitude: "", //贵宾厅纬度
        managerName: "", //负责人名称
        managerPhone: "", //负责人电话
        loungeAddressClass: "安检内", //贵宾厅位置
        departRegion: "国内出发", //出发区域
        businessStartTime: "", //营业开始时间
        businessEndTime: "", //营业结束时间
        loungeStatus: "yes", //状态(yes启用/no未启用/del删除)
        isInclusionChannel: "yes", //是否含通道
        purchasePrice: "", //采购价
        marketPrice: "", //市场价
        sellingPrice: "", //销售价
        memberPrice: "", //会员销售价
        integralPrice: "", //积分兑换价
        loungeRemark: "", //备注
        loungeDetails: "", //富文本
        // 替换字段
        ofPlaceIdtihuan: "",
        ofCityIdtihuan: "",
        ofTerminalIdtihuan: "",
      },
      imgasList: [],
      // 富文本
      quill: "",
      // 删除弹窗
      delViphhallDialogVisible: false,
      // 火车城市
      cityTrainList: [],
      // 飞机城市
      cityFlightList: [],
      //机场数据
      airportList: [],
      //机场数据
      trainList: [],
      //航站楼下拉列表数据
      Terminallist: [],
      // 部门列表
      departmentList: [],
      // 人员下拉
      postslists: [],
      // 设施列表
      selectViphaltagList: [],
      // 服务设施增加
      manageDialogVisibleson: false,
      manageDialogVisible: false,
      // 删除服务设施弹窗
      delmanageDialogVisibleson: false,
      // 服务设施新增
      addtagdata: {
        id: "",
        facilityName: "", //名称
        facilityPic: "", //图片
        facilityPicImg: "", //图片显示
      },
      // 选中的设施列表
      facility: [],
      // 外层图片
      fatherImgdialogVisible: false,
      fatherImglistPic: [],
      dialogImageUrl: "",
      // 套餐新增弹窗
      instructionsDialogVisible: false,
      // 套餐列表
      viphallServiceInstructionsList: [],
      // 新增套餐数据
      instructionadddata: {
        id: "",
        name: "",
        content: "",
        imgurl: "",
        imgurlImg: "",
      },
      // 列表数据
      viphallList: [],
      //新增弹出框
      centerDialogVisible: false,
      // 套餐删除
      delinstructionsDialogVisible: false,
      editorOption: {
        theme: "snow",
        modules: {
          toolbar: {
            container: toolbarOptions,
            handlers: {
              image(value) {
                if (value) {
                  document.querySelector(".quill-img input").click();
                } else {
                  _this.quill.format("image", false);
                }
              },
            },
          },
        },
      },
    };
  },
  watch: {},
  methods: {
    // 删除事件
    delMethod(val) {
      this.adddata.id = val.id;
      this.delViphhallDialogVisible = !this.delViphhallDialogVisible;
    },
    delVipLounge() {
      this.$axios
        .delVipLounge({
          id: this.adddata.id,
        })
        .then((res) => {
          console.log(res);
          if (res.code == "00000") {
            this.$message({
              message: "删除成功",
              type: "success",
            });
            this.getVipLoungeList();
            this.delViphhallDialogVisible = !this.delViphhallDialogVisible;
          }
        });
    },
    // vip基础数据列表
    getVipLoungeList() {
      this.$axios
        .getVipLoungeList({
          ofType: this.selectData.ofType,
          ofCityId: this.selectData.ofCityId,
          loungeName: this.selectData.loungeName,
          loungeStatus: this.selectData.loungeStatus,
          pageSize: this.selectData.pageSize,
          pageNo: this.selectData.pageNo,
        })
        .then((res) => {
          console.log(res);
          if (res.code == "00000") {
            this.viphallList = res.data.records;
            this.viphallListTotal = res.data.total;
          }
        });
    },
    //首页列表分页
    selviphalllisthandleSizeChange(value) {
      this.selectData.pageSize = value;
      this.getVipLoungeList();
    },
    selviphalllisthandleCurrentChange(value) {
      this.selectData.pageNo = value;
      this.getVipLoungeList();
    },
    // 查询按钮
    selectMethod() {
      this.selectData.pageSize = 10;
      this.selectData.pageNo = 1;
      this.getVipLoungeList();
    },
    // 飞机城市
    getqueryFlightCityByName() {
      this.$axios.getqueryFlightCityByName({}).then((res) => {
        if (res.code == "00000") {
          this.cityFlightList = res.data;
        }
      });
    },
    // 火车城市
    getqueryTrainCityByName() {
      this.$axios.getqueryTrainCityByName({}).then((res) => {
        if (res.code == "00000") {
          this.cityTrainList = res.data;
          console.log(this.cityTrainList);
        }
      });
    },
    // 城市的change事件
    cityFlightChange(val) {
      this.adddata.ofCityCode = val;
      console.log(this.adddata.ofCityName);
      this.$axios
        .queryAirportByCityCode({
          cityCode: val,
        })
        .then((res) => {
          if (res.code == "00000") {
            this.airportList = res.data;
          }
        });
    },
    cityTrainChange(val) {
      this.$axios
        .queryStationByCityCode({
          cityCode: val,
        })
        .then((res) => {
          if (res.code == "00000") {
            this.trainList = res.data;
          }
        });
    },
    // 城市Change
    ofPlaceIdChange(val) {
      console.log(val);
      this.$axios
        .queryTerminalByAirportCode({
          airportCode: val,
        })
        .then((res) => {
          if (res.code == "00000") {
            this.Terminallist = res.data;
          }
        });
    },
    // 火车城市change
    ofPlaceIdTrainChange(val) {
      console.log(val);
    },
    // 航站楼change
    ofTerminalIdChange(val) {
      console.log(val);
      let List = val.split("-");
      this.adddata.ofTerminalId = List[0];
      this.adddata.ofTerminalName = List[1];
    },
    // 部门
    getDeptListAll() {
      this.$axios.getDeptListAll({}).then((res) => {
        console.log(res);
        if (res.code == "00000") {
          this.departmentList = res.data;
          console.log(this.departmentList);
        }
      });
    },
    // 部门change事件
    deptIdchange(val) {
      this.$axios
        .getAdminByDept({
          deptId: val,
        })
        .then((res) => {
          console.log(res);
          if (res.code == "00000") {
            this.postslists = res.data;
          }
        });
    },
    // 获取经纬度
    coordinatesgdList() {
      window.open("http://lbs.amap.com/console/show/picker");
    },
    // 富文本图片上传
    uploadSuccess(res) {
      console.log(res);
      // this.viphallImagedescList.imageurl = res.data;
      const quill = this.$refs.myQuillEditor.quill;
      console.log(quill);
      quill.focus();
      quill.insertEmbed(quill.getSelection().index, "image", res.data[0]);
      console.log(quill.focus());
      console.log(quill.getSelection().index, res.data[0]);
    },
    // 富文本changge事件
    onEditorChange(e) {
      console.log(e);
      this.adddata.loungeDetails = e.html;
      this.$emit("update:quillContent", e.html);
    },
    //贵宾厅服务设施列表
    getselectViphallTag() {
      this.$axios.getVipFacilityList({}).then((res) => {
        console.log(res);
        if (res.code == "00000") {
          this.selectViphaltagList = res.data;
        }
      });
    },
    // 服务设施增加
    addmanageMethod() {
      this.adddata.loungeFacility = "";
      this.addtagdata.facilityPic = "";
      this.addtagdata.facilityPicImg = "";
      this.addtagdata.facilityName = "";
      this.addtagdata.id = "";
      this.manageDialogVisibleson = !this.manageDialogVisibleson;
    },
    // 服务设施新增图片
    manageImgSuccess(val) {
      this.addtagdata.facilityPic = val.data[0];
      this.addtagdata.facilityPicImg = this.baseURL + val.data[0];
    },
    // 服务设施添加按钮
    addtagMethod() {
      this.adddata.loungeSuit = "";
      if (this.addtagdata.facilityName != "") {
        if (this.addtagdata.facilityPic != "") {
          if (this.addtagdata.id == "") {
            this.$axios
              .addVipFacility({
                facilityName: this.addtagdata.facilityName,
                facilityPic: this.addtagdata.facilityPic,
              })
              .then((res) => {
                console.log(res);
                if (res.code == "00000") {
                  this.$message({
                    message: "新增成功",
                    type: "success",
                  });
                  this.getselectViphallTag();
                  this.manageDialogVisibleson = !this.manageDialogVisibleson;
                }
              });
          } else {
            this.$axios
              .updVipFacility({
                id: this.addtagdata.id,
                facilityName: this.addtagdata.facilityName,
                facilityPic: this.addtagdata.facilityPic,
              })
              .then((res) => {
                console.log(res);
                if (res.code == "00000") {
                  this.$message({
                    message: "修改成功",
                    type: "success",
                  });
                  this.getselectViphallTag();
                  this.manageDialogVisibleson = !this.manageDialogVisibleson;
                }
              });
          }
        } else {
          this.$message({
            message: "请选择图片",
            type: "warning",
          });
        }
      } else {
        this.$message({
          message: "请输入服务设施名称",
          type: "warning",
        });
      }
    },
    // 选中服务设施change事件
    facilityChange(val) {
      console.log(val);
      let list = [];
      for (let i = 0; i < val.length; i++) {
        if (val[i] == this.selectViphaltagList[i].id) {
          list.push(this.selectViphaltagList[i]);
        }
      }
      console.log(list);
      this.adddata.loungeFacility = "";
      this.adddata.loungeFacility = JSON.stringify(list);
      console.log(this.adddata.loungeFacility);
    },
    // 修改设施点击事件
    editmanageMethod(row) {
      console.log(row);
      let facilityName = row.facilityName;
      let facilityPic = row.facilityPic;
      let id = row.id;
      this.addtagdata.id = id;
      this.addtagdata.facilityName = facilityName;
      this.addtagdata.facilityPic = facilityPic;
      this.addtagdata.facilityPicImg = this.baseURL + facilityPic;
      this.manageDialogVisibleson = !this.manageDialogVisibleson;
      console.log(this.addtagdata.facilityPicImg);
    },
    // 删除服务设施点击事件
    delmanageMethod(row) {
      this.addtagdata.id = row.id;
      this.delmanageDialogVisibleson = !this.delmanageDialogVisibleson;
    },
    //贵宾厅标签删除
    getdelRemovemanage() {
      this.$axios
        .delVipFacility({
          id: this.addtagdata.id,
        })
        .then((res) => {
          console.log(res);
          if (res.code == "00000") {
            this.delmanageDialogVisibleson = !this.delmanageDialogVisibleson;

            this.getselectViphallTag();
            this.$message({
              message: "删除成功",
              type: "success",
            });
          }
        });
    },
    //套餐新增事件
    instructionsDialogVisiblemethod() {
      this.instructionsDialogVisible = !this.instructionsDialogVisible;
      (this.instructionadddata.name = ""),
        (this.instructionadddata.content = ""),
        (this.instructionadddata.imgurl = ""),
        (this.instructionadddata.imgurlImg = "");
    },
    // 套餐图片上传
    instructionImgSuccess(val) {
      this.instructionadddata.imgurl = val.data[0];
      this.instructionadddata.imgurlImg = this.baseURL + val.data[0];
    },
    // 套餐点击事件
    instructionsclick() {
      if (
        this.instructionadddata.imgurl == "" ||
        this.instructionadddata.content == "" ||
        this.instructionadddata.content == ""
      ) {
        this.$message({
          message: "请完整填写",
          type: "warning",
        });
      } else {
        let obj = {
          imgurl: this.instructionadddata.imgurl,
          content: this.instructionadddata.content,
          name: this.instructionadddata.name,
        };
        this.viphallServiceInstructionsList.push(obj);
        this.instructionsDialogVisible = !this.instructionsDialogVisible;
        this.adddata.loungeSuit = JSON.stringify(
          this.viphallServiceInstructionsList
        );
      }
    },
    // 套餐删除点击事件
    delinstrmethod(row, index) {
      console.log(index);
      this.viphallServiceInstructionsList.splice(index, 1);
      console.log(this.viphallServiceInstructionsList);
    },
    // 外层图片上传成功函数
    fatherImghandlePic(response, file, fileList) {
      this.adddata.loungeBackground = "";
      console.log(response, file, fileList);
      console.log(this.fatherImglistPic);
      this.imgasList.push(response.data[0]);
      this.adddata.loungeBackground = JSON.stringify(this.imgasList);
      console.log(this.adddata.loungeBackground);
    },
    fatherImghandleRemove(file, fileList) {
      console.log(file, fileList);
      let newArr = [];
      newArr = fileList.map((item) => {
        if (item.response) {
          return item.response.data[0];
        } else {
          return item.url;
        }
      });
      console.log(newArr);
      this.imgasList = newArr;
      this.adddata.loungeBackground = JSON.stringify(this.imgasList);
      console.log(this.adddata.loungeBackground);
    },
    // 创建基础数据确定按钮
    gocreate() {
      console.log(this.adddata.ofType)
      if (this.adddata.ofType!=''&&this.adddata.ofCityCode!=''&&this.adddata.deptId!=''&&this.adddata.deptAdminId!='') {
        if (this.adddata.loungeName!=''&&this.adddata.loungeAddress!=''&&this.adddata.loungeLongitude!=''&&this.adddata.loungeLatitude!=''&&this.adddata.managerName!=''&&
        this.adddata.managerPhone!=''&& this.adddata.businessStartTime!=''&& this.adddata.businessEndTime!=''&&this.adddata.loungeFacility!=''
        ) {
          if (this.adddata.purchasePrice!=''&&this.adddata.marketPrice!=''&&this.adddata.sellingPrice!=''&&this.adddata.memberPrice!=''&&this.adddata.loungeScore!='') {
            if (this.adddata.loungeBackground!=''&&this.adddata.loungeDetails!='') {
              if (this.adddata.id == "") {
                  this.getsaveVipHallviphall();
                } else {
                  this.getupdVipLounge();
                }
            }else{
                this.$message({
                  message: "图片和图文维护为必填项",
                  type: "warning",
                });
            }
          }else{
              this.$message({
                message: "请检查价格信息",
                type: "warning",
              });
          }
          
        }else{
              this.$message({
                message: "请检查贵宾厅信息",
                type: "warning",
              });
        }
      }else{
            this.$message({
            message: "请检查基本信息",
            type: "warning",
          });
      }
    },
    // vip基础数据添加
    getsaveVipHallviphall() {
      console.log(this.adddata);
      this.$axios
        .getaddVipLounge({
          ofType: this.adddata.ofType,
          ofCityId: this.adddata.ofCityId,
          ofCityName: this.adddata.ofCityName,
          ofCityCode: this.adddata.ofCityCode,
          ofPlaceId: this.adddata.ofPlaceId,
          ofPlaceName: this.adddata.ofPlaceName,
          ofPlaceCode: this.adddata.ofPlaceCode,
          ofTerminalId: this.adddata.ofTerminalId,
          ofTerminalName: this.adddata.ofTerminalName,
          deptId: this.adddata.deptId,
          deptAdminId: this.adddata.deptAdminId,
          loungeName: this.adddata.loungeName,
          loungeAddress: this.adddata.loungeAddress,
          loungePhone: this.adddata.loungePhone,
          loungeCalss: this.adddata.loungeCalss,
          loungeScore: this.adddata.loungeScore,
          loungeLabel: this.adddata.loungeLabel,
          loungeFacility: this.adddata.loungeFacility,
          loungeSuit: this.adddata.loungeSuit,
          loungeBackground: this.adddata.loungeBackground,
          loungeLongitude: this.adddata.loungeLongitude,
          loungeLatitude: this.adddata.loungeLatitude,
          managerName: this.adddata.managerName,
          managerPhone: this.adddata.managerPhone,
          loungeAddressClass: this.adddata.loungeAddressClass,
          departRegion: this.adddata.departRegion,
          businessStartTime: this.adddata.businessStartTime,
          businessEndTime: this.adddata.businessEndTime,
          loungeStatus: this.adddata.loungeStatus,
          isInclusionChannel: this.adddata.isInclusionChannel,
          purchasePrice: this.adddata.purchasePrice,
          marketPrice: this.adddata.marketPrice,
          sellingPrice: this.adddata.sellingPrice,
          memberPrice: this.adddata.memberPrice,
          integralPrice: this.adddata.integralPrice,
          loungeRemark: this.adddata.loungeRemark,
          loungeDetails: this.adddata.loungeDetails,
        })
        .then((res) => {
          console.log(res);
          if (res.code == "00000") {
            this.$message({
              message: "新增成功",
              type: "success",
            });
            this.centerDialogVisible = !this.centerDialogVisible;
            this.getVipLoungeList();
          }
        });
    },
    // vip基础数据修改
    getupdVipLounge() {
      console.log(this.adddata);
      this.$axios
        .getupdVipLounge({
          id: this.adddata.id,
          ofType: this.adddata.ofType,
          ofCityId: this.adddata.ofCityId,
          ofCityName: this.adddata.ofCityName,
          ofCityCode: this.adddata.ofCityCode,
          ofPlaceId: this.adddata.ofPlaceId,
          ofPlaceName: this.adddata.ofPlaceName,
          ofPlaceCode: this.adddata.ofPlaceCode,
          ofTerminalId: this.adddata.ofTerminalId,
          ofTerminalName: this.adddata.ofTerminalName,
          deptId: this.adddata.deptId,
          deptAdminId: this.adddata.deptAdminId,
          loungeName: this.adddata.loungeName,
          loungeAddress: this.adddata.loungeAddress,
          loungePhone: this.adddata.loungePhone,
          loungeCalss: this.adddata.loungeCalss,
          loungeScore: this.adddata.loungeScore,
          loungeLabel: this.adddata.loungeLabel,
          loungeFacility: this.adddata.loungeFacility,
          loungeSuit: this.adddata.loungeSuit,
          loungeBackground: this.adddata.loungeBackground,
          loungeLongitude: this.adddata.loungeLongitude,
          loungeLatitude: this.adddata.loungeLatitude,
          managerName: this.adddata.managerName,
          managerPhone: this.adddata.managerPhone,
          loungeAddressClass: this.adddata.loungeAddressClass,
          departRegion: this.adddata.departRegion,
          businessStartTime: this.adddata.businessStartTime,
          businessEndTime: this.adddata.businessEndTime,
          loungeStatus: this.adddata.loungeStatus,
          isInclusionChannel: this.adddata.isInclusionChannel,
          purchasePrice: this.adddata.purchasePrice,
          marketPrice: this.adddata.marketPrice,
          sellingPrice: this.adddata.sellingPrice,
          memberPrice: this.adddata.memberPrice,
          integralPrice: this.adddata.integralPrice,
          loungeRemark: this.adddata.loungeRemark,
          loungeDetails: this.adddata.loungeDetails,
        })
        .then((res) => {
          console.log(res);
          if (res.code == "00000") {
            this.$message({
              message: "修改成功",
              type: "success",
            });
            this.centerDialogVisible = !this.centerDialogVisible;
            this.getVipLoungeList();
          }
        });
    },
    // 修改按钮
    editviphallmethod(val) {
      console.log(val);
      this.adddata.id = val.id;
      this.$axios
        .getVipLoungeInfo({
          id: this.adddata.id,
        })
        .then((res) => {
          console.log(res);
          if (res.code == "00000") {
            this.centerDialogVisible = !this.centerDialogVisible;
            this.adddata = res.data;
            console.log(JSON.parse(res.data.loungeBackground));
            let loungeBackgroundList = JSON.parse(res.data.loungeBackground);

            console.log(loungeBackgroundList);
            this.fatherImglistPic = [];
            for (let i = 0; i < loungeBackgroundList.length; i++) {
              let obj = {
                url: loungeBackgroundList[i],
              };
              this.fatherImglistPic.push(obj);
            }
            console.log(this.fatherImglistPic);
            this.imgasList = loungeBackgroundList.map((item) => {
              console.log(item);
              return item;
            });
            console.log(this.imgasList);
            this.viphallServiceInstructionsList = JSON.parse(
              res.data.loungeSuit
            );
            let facilityList = JSON.parse(res.data.loungeFacility);
            this.facility = facilityList.map((item) => {
              return item.id;
            });
            console.log(this.facility);
            this.quill = res.data.loungeDetails;
            this.cityFlightChange(res.data.ofCityCode);
            this.ofPlaceIdChange(res.data.ofPlaceCode);
            this.deptIdchange(res.data.deptId);
          }
        });
    },

    // 新增按钮清除数据
    clearadddate() {
      this.viphallServiceInstructionsList = [];
      // this.adddata = {};
      this.adddata.id = "";
      this.facility = [];
      this.fatherImglistPic = [];
      this.quill = "";
      this.centerDialogVisible = !this.centerDialogVisible;
      this.adddata.loungeCalss = "餐厅";
      this.adddata.loungeAddressClass = "安检内";
      this.adddata.departRegion = "国内出发";
      this.adddata.loungeStatus = "yes";
      this.adddata.isInclusionChannel = "yes";

      this.adddata.ofType = "";
      this.adddata.ofCityId = "";
      this.adddata.ofCityName = "";
      this.adddata.ofCityCode = "";
      this.adddata.ofPlaceId = "";
      this.adddata.ofPlaceName = "";
      this.adddata.ofPlaceCode = "";
      this.adddata.ofTerminalId = "";
      this.adddata.ofTerminalName = "";

      this.adddata.deptId = "";
      this.adddata.deptAdminId = "";
      this.adddata.loungeName = "";
      this.adddata.loungePhone = "";
      this.adddata.loungeScore = "";
      this.adddata.loungeLabel = "";
      this.adddata.loungeFacility = "";


      this.adddata.loungeSuit = "";
      this.adddata.loungeBackground = "";
      this.adddata.loungeLongitude = "";
      this.adddata.loungeLatitude = "";
      this.adddata.managerName = "";
      this.adddata.managerPhone = "";
      this.adddata.businessStartTime = "";
      this.adddata.purchasePrice = "";
      this.adddata.marketPrice = "";
      this.adddata.sellingPrice = "";
      this.adddata.memberPrice = "";
      this.adddata.integralPrice = "";
      this.adddata.loungeRemark = "";
      this.adddata.loungeDetails = "";
    },
  },
  mounted() {
    this.getVipLoungeList();
    this.getqueryFlightCityByName();
    this.getqueryTrainCityByName();
    // 部门
    this.getDeptListAll();
    // 设施列表
    this.getselectViphallTag();
  },
  created() {},
};
</script>

<style scoped>
.middle {
  display: flex;
  margin-top: 20px;
  margin-left: 10px;
}

.table {
  margin-left: 20px;
}

.caseClaim {
  font-size: 14px;
  font-weight: 400px;
}

.jbxx {
  border: 0.5px solid #4490ae;
  margin: 10px;
}

.lump-top {
  width: 100%;
  height: 30px;
  line-height: 30px;
  border-right: 0.5px solid #4490ae;
  border-bottom: 0.5px solid #4490ae;
  background: #e8f3f7;
  font-weight: 600;
  padding-left: 5px;
}

.lump-bottom {
  display: flex;
}

.lump-bottom-small {
  padding-left: 5px;
  width: 12%;
  height: 30px;
  line-height: 30px;
  background: #e8f3f7;
  border-right: 0.5px solid #4490ae;
  border-left: 0.5px solid #4490ae;
  border-bottom: 0.5px solid #4490ae;
}

.lump-bottom-small-1 {
  padding-left: 5px;
  width: 80px;

  background: #e8f3f7;
  border-right: 0.5px solid #4490ae;
  border-left: 0.5px solid #4490ae;
  border-bottom: 0.5px solid #4490ae;
}

.lump-bottom-big {
  width: 250px;
  height: 30px;
  line-height: 30px;
}

.lump-bottom-big-1 {
  border-bottom: 0.5px solid #4490ae;

  width: 400px;
}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
.mustItem{
  color: red;
}
</style>